//
//  CET4WordModel.m
//  WordTutor
//
//  Created by lanou3g on 15/11/19.
//  Copyright © 2015年 lyh. All rights reserved.
//

#import "CET4WordModel.h"
#import "CET4DB.h"

@implementation CET4WordModel


/**
 *  初始化一个CET4Model实例 即给一个CET4Model赋值
 *
 *  @param dict 传入的字典用于给model赋值
 *
 *  @return 返回一个model实例
 */
-(instancetype)initWithDict:(NSDictionary *)dict {
    if (self = [super init]) {
        
        [self setValuesForKeysWithDictionary:dict];
        
    }
    
    return self;
    
}




+(NSMutableArray *) CET4WordModelArray {
    
    //获取查询的单词 音标 翻译的数组
    NSMutableArray *cet4Array = [[CET4DB shareCET4DB] selectCetFourWord];
    
    NSMutableArray *modelArray = [NSMutableArray array];
    for (NSDictionary *dict in cet4Array) {
        
        [modelArray addObject:[[self alloc] initWithDict:dict]];
        
    }
    
    return modelArray;
}


-(void)setValue:(id)value forUndefinedKey:(NSString *)key {
    
}


@end
